package com.binance.notification.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIResponse;
import com.binance.notification.api.request.AddAbnormalConfigRequest;
import com.binance.notification.api.request.DeleteAbnormalConfigRequest;
import com.binance.notification.api.request.GetAbnormalConfigRequest;
import com.binance.notification.api.request.UpdateAbnormalConfigRequest;
import com.binance.notification.api.response.GetAbnormalConfigResponse;
import com.binance.notification.api.vo.PagingResult;

import io.swagger.annotations.Api;

@FeignClient(name = Constant.NOTIFICATION_WEB_SERVICE, configuration = FeignConfig.class)
@Api(value = "价格异动配置接口")
public interface IAbnormalThresholdConfigApi {

    @PostMapping("/abnormalprice/getAbnormalConfigList")
    public APIResponse<PagingResult<GetAbnormalConfigResponse>> getAbnormalConfigList(
            @RequestBody APIRequest<GetAbnormalConfigRequest> request) throws Exception;

    @PostMapping("/abnormalprice/addAbnormalConfig")
    public APIResponse<Void> addAbnormalConfig(@RequestBody APIRequest<AddAbnormalConfigRequest> request)
            throws Exception;

    @PostMapping("/abnormalprice/updateAbnormalConfig")
    public APIResponse<Void> updateAbnormalConfig(@RequestBody APIRequest<UpdateAbnormalConfigRequest> request)
            throws Exception;

    @PostMapping("/abnormalprice/deleteAbnormalConfig")
    public APIResponse<Void> deleteAbnormalConfig(@RequestBody APIRequest<DeleteAbnormalConfigRequest> request)
            throws Exception;


    @PostMapping("/abnormalprice/findById")
    public APIResponse<GetAbnormalConfigResponse> findById(@RequestBody APIRequest<Long> request) throws Exception;


}
